package com.shop.service.impl;

import com.shop.dao.IUserDao;
import com.shop.dao.impl.UserDaoImpl;
import com.shop.entity.User;
import com.shop.service.IUserService;

import java.util.List;

public class UserServiceImpl implements IUserService {
    private IUserDao dao = new UserDaoImpl();

    @Override
    public List<User> selectAllUser() {
        return dao.selectAllUser();
    }

    @Override
    public boolean insertUser(User user) {
        return dao.insertUser(user);
    }

    @Override
    public boolean updateUser(String code) {
        return dao.updateUser(code);
    }

    @Override
    public User selectUserByName(String username) {
        return dao.selectUserByName(username);
    }
}
